<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no,minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link href="../css/MoCoop.css" rel="stylesheet">
    <!--MoCoop CSS-->
    <link href="../css/style.css" rel="stylesheet">
    <!--自定义样式-->
    <title>期货盈亏</title>
    <script>
        onerror = function (message, url, line) {
            alert("error :\n message:" + message + " \n url:" + url + " \n line:" + line);
        };
    </script>
</head>
<body class="pagebg-grey">
<div class="container">
    <div class="header">
        <div class="tab-btns">
            <div class="tab-btn tab-select" value="1">
                <div class="mc-btn">期货盈亏</div>
            </div>
            <div class="tab-btn" value="2">
                <div class="mc-btn">期货持仓</div>
            </div>
        </div>
    </div>
    <div class="GF-content">
        <div class="tabContent1"  id="CONTAINER-profitlossList">
        </div>
        <script id="TEMPLATE-profitlossList" type="text/ractive">
            <div class="ssn">
                <div class="GF-tiles">
                    <div class="time">
                        <div class="title">截止交易日</div>
                        <div class="ut-blok">
                            <div class="ut-left">
                                <input id="profitLossMonth" type="month"/>
                            </div>
                            <div class="ut-right">
                                <select id="profitLossDate" value="{{selectDataList.selected}}">
                                    {{#selectDataList.list}}
                                        <option value="{{odate}}">{{odate}}</option>
                                    {{/selectDataList.list}}
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="company"> 单位：吨、元</div>
                </div>
            </div>
            <!--期货盈亏-->
            <div id="tabLeft">
                <div class="table-block">
                    <div class="tb-left">
                        <div class="tb-tr">
                            <div>操作单位</div>
                            <div>持仓品种</div>
                        </div>
                        {{#listData.list}}
                        <div class="tb-tr">
                            <div>{{reportmbcodename}}</div>
                            <div>{{statsgtypename}}</div>
                        </div>
                        {{/listData.list}}
                        <div class="tb-tr tb-total-left">
                            合计
                        </div>
                    </div>
                    <div class="tb-right">
                        <table>
                            <tr>
                                <td class="text-center">期货浮动<br>盈亏<br>①</td>
                                <td class="text-center">现货浮动<br>盈亏<br>②</td>
                                <td class="text-center">期、现盈<br>亏合计<br>③=①+②</td>
                                <td class="text-center">持仓保证<br>金</td>
                                <td class="text-center">期货账户<br>可用资金</td>
                                <td class="text-center">财务账面未<br>体现期货损益</td>
                            </tr>
                            {{#listData.list}}
                            <tr>
                                <td class='{{parseFloat(fcy3) < 0?"red":"" }}'>{{fcy3}}</td>
                                <td class='{{parseFloat(fcy4) < 0?"red":"" }}'>{{fcy4}}</td>
                                <td class='{{parseFloat(fcy5) < 0?"red":"" }}'>{{fcy5}}</td>
                                <td class='{{parseFloat(fcy8) < 0?"red":"" }}'>{{fcy8}}</td>
                                <td class='{{parseFloat(hyfcy) < 0?"red":"" }}'>{{hyfcy}}</td>
                                <td class='{{parseFloat(syfcy) < 0?"red":"" }}'>{{syfcy}}</td>
                            </tr>
                            {{/listData.list}}
                            <tr class="tb-total-left">
                                <td class='{{parseFloat(listData.sum_fcy3) < 0?"red":"" }}'>{{listData.sum_fcy3}}</td>
                                <td class='{{parseFloat(listData.sum_fcy4) < 0?"red":"" }}'>{{listData.sum_fcy4}}</td>
                                <td class='{{parseFloat(listData.sum_fcy5) < 0?"red":"" }}'>{{listData.sum_fcy5}}</td>
                                <td class='{{parseFloat(listData.sum_fcy8) < 0?"red":"" }}'>{{listData.sum_fcy8}}</td>
                                <td class='{{parseFloat(listData.sum_hyfcy) < 0?"red":"" }}'>{{listData.sum_hyfcy}}</td>
                                <td class='{{parseFloat(listData.sum_syfcy) < 0?"red":"" }}'>{{listData.sum_syfcy}}</td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="tb-nodata-left">
                    暂无数据
                </div>
                <!--容器END-->
            </div>

        </script>
        <!--模板END-->

        <!-- 期货持仓-->
        <div class="tabContent2" id="CONTAINER-position">
        </div>
        <script id="TEMPLATE-positionList" type="text/ractive">
                <div class="ssn">
                    <div class="GF-tiles">
                        <div class="time">
                            <div class="title">截止交易日</div>
                            <div class="ut-blok">
                                <div class="ut-left">
                                    <input id="UpTodate" type="month"/>
                                </div>
                                <div class="ut-right">
                                     <select id="positionDate" value="{{selectDataList.selected}}">
                                        {{#selectDataList.list}}
                                            <option value="{{odate}}">{{odate}}</option>
                                        {{/selectDataList.list}}
                                    </select>
                                </div>
                            </div>
                            <!--<div class="left">截止交易日</div>-->
                            <!--<div class="right"><input id="profitlossDate" type="date"/></div>-->
                        </div>
                        <div class="company"> 单位：吨、元</div>
                    </div>
                </div>
                <div id="table">
                    <div class="table-block">
                        <div class="tb-left">
                            <div class="tb-tr">
                                <div>持仓品种</div>
                                <div>操作单位</div>
                            </div>
                            {{#futureslist.list}}
                            <div class="tb-tr">
                                <div>{{statsgtypename}}--{{remark1}}</div>
                                <div>{{reportmbcodename}}</div>
                            </div>
                            {{/futureslist.list}}
                            <div class="tb-tr tb-total-right">
                                合计
                            </div>
                        </div>
                        <div class="tb-right">
                            <table>
                                <tr>
                                     <td class="text-left">买/卖</td>
                                     <td class="text-center">卖仓数量<br>①</td>
                                     <td class="text-center">实物持有<br>②</td>
                                     <td class="text-center">套保比例<br>③=①/②</td>
                                     <td class="text-center">期货建仓价<br>④</td>
                                     <td class="text-center">截止交易<br>日结算价<br>⑤</td>
                                     <td class="text-center">期货浮动<br>盈亏<br>⑥=(④-⑤)×①</td>
                                     <td class="text-center">持仓保证<br>金</td>
                                </tr>
                                {{#futureslist.list}}
                                <tr>
                                    <td class="cen"><span>{{dcname}}</span></td>
                                    <td class='{{parseFloat(qty1) < 0?"red":"" }}'>{{qty1}}</td>
                                    <td class='{{parseFloat(qty2) < 0?"red":"" }}'>{{qty2}}</td>
                                    <td class='{{parseFloat(qty10) < 0?"red":"" }}'>{{qty10}}</td>
                                    <td class='{{parseFloat(fcy1) < 0?"red":"" }}'>{{fcy1}}</td>
                                    <td class='{{parseFloat(fcy6) < 0?"red":"" }}'>{{fcy6}}</td>
                                    <td class='{{parseFloat(fcy3) < 0?"red":"" }}'>{{fcy3}}</td>
                                    <td class='{{parseFloat(fcy8) < 0?"red":"" }}'>{{fcy8}}</td>
                                </tr>
                                {{/futureslist.list}}
                                <tr class="tb-total-right">
                                    <td>{{dcname}}</td>
                                    <td class='{{parseFloat(futureslist.sum_fcy1) < 0?"red":"" }}'>{{futureslist.sum_qty1}}</td>
                                    <td class='{{parseFloat(futureslist.sum_qty2) < 0?"red":"" }}'>{{futureslist.sum_qty2}}</td>
                                    <td class='{{parseFloat(futureslist.sum_qty10) < 0?"red":"" }}'>{{futureslist.sum_qty10}}</td>
                                    <td class='{{parseFloat(futureslist.sum_qty1) < 0?"red":"" }}'>{{futureslist.sum_fcy1}}</td>
                                    <td class='{{parseFloat(futureslist.sum_fcy6) < 0?"red":"" }}'>{{futureslist.sum_fcy6}}</td>
                                    <td class='{{parseFloat(futureslist.sum_fcy3) < 0?"red":"" }}'>{{futureslist.sum_fcy3}}</td>
                                    <td class='{{parseFloat(futureslist.sum_fcy8) < 0?"red":"" }}'>{{futureslist.sum_fcy8}}</td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="tb-nodata-right">
                        暂无数据
                    </div>
                    <!--容器END-->
                </div>
            </script><!--模板END-->
    </div>
</div>
</body>
<script src="../js/MoCoop/components/require/require.js" data-main="../js/pages/index"></script>
</html>
